#TIL
https://github.com/golang/go/issues/73707
slog.Logger is designed to be a logging frontend. if you need an alternative frontend, like in some bridge, we expect you to call slog.Handler directly.
https://github.com/golang/go/issues/73707
GitHub
proposal: log/slog: Add LogDepth · Issue #73707 · golang/go
Proposal Details When implementing bridging logger types with slog as backend, the pc used for getting source info is incorrect. The current workaround would be copying Logger.log, and tweaking the...
#TIL
原来这种风格的结构化日志格式叫 logfmt。
https://brandur.org/logfmt
level=DEBUG msg="received seed" component=preprocessor.worker worker_id=2 seed=f0523
原来这种风格的结构化日志格式叫 logfmt。
https://brandur.org/logfmt
www.brandur.org
logfmt
A logging format used inside companies such as Heroku and Stripe which is optimal for easy development, consistency, and good legibility for humans and computers.
❤1